Fix close simulator and add reset simulator