Improve thread safety of stage.