#266, fix error when opening with no previous state