Fix check for debug mode in Simulator