Added keeping track of the initial state on open.