fix some bug in log