fix check for debug page