solve persistant data bug, fix minimize at start bug