All the elements are in place, but there is a bug in the calculation of
the offset.