fixed loggin