Fix NRE on the simulator