fix offset issue