Fix indexerr caused by debug page in non-debug mode