Fixed a bug in clear_log.