Fixed log level checking.