fix simulator index register error.