fix logic around read marker