fixed wrong handling of debug level