Fixed bug caused by debug log.