Added an offset to the de-duplication code