Minor fixes to simulator