fixing avatar code