Fixed the value duplication bug