Added debug handler to optimize compile.