logging in bug fix