Remove repeated sequence