Fixed repeated values bug