move load last state to init