Really binding the saveState function