Another update to sample offset code