fix offset correction