Fix simulate bug