fix some bugs in recordReader