fixed bug of losting internal state if the stage is mapped to an external process