Improve the read_marks code to make sure it is from the same object