Fixed log.warn bug