fixed simulator bug on last line