Fix main setup in simulator