Simulator linux

Fixed an init bug in Linux and an init bug in all platforms.