fix for loggin bug