Bug fix, log system