Fixed a bug and remove some log.