Added if statement for avatar