fix trailing offsets