fixed duplicated x variable