Fixed loggin issues