Duplicate variable fix