bugfix logging in rare exception.