fixed bug in avatar.php