Changed return value in restoreState