fixes LocalTest (a bit).
fixes simulator.