fixing loggin