diff --git a/components/options.php b/components/options.php
index b21ebb3b53fb481830c2f584bec746fa24d095d0..63a958af2a52639b622667db2174dcd835fe880b 100644
--- a/components/options.php
+++ b/components/options.php
@@ -136,7 +136,7 @@ function clearHackergotchi() {
 	global $session;
 	$imagefilepath = hackergotchiPath($session->username);
 
-	if (unlink($imagefilepath)) {
+	if (unlink(realpath($imagefilepath))) {
 		return true;
 	} else { 
 		trigger_error("Unable to remove hackergotchi file", E_USER_ERROR);