Fixing very silly bugs, simulation now stable