Fixes to runsim