fix avatar_url function