Fix agent debug level logic.