empty/full flags broken, getting xx at second read