Fixed read state

Fixed a bug with read state.