Fixed the encode repeat data