fix offset of locals