fix bugs in log level