fix and update offset