Simulator bug fixing