restore state of ragment