Fixed some behavior with logging