fix offset and limit