minor fix with duplicate variables.