Improve log fix #312 #383.