fixing logging in