Fix redundant/multiple offset repeat bug