Fix log in bug