change fd.seek logic