Fix compilation errors in simulator.