Fixing loggin issue