Fix read state detection