Fixed glitch with logging in due to dirty variables