fixed horizontal offsets calculation