Fixed the reset in last last phase