fix bug: return absolute offset instead of length read