Changed how the offset is calculated for the unit tests.