Fix loggin issues