Fixed stupid duplication error

My initial commit was wrong as I've applied patch on a wrong version and got a redeclaration problem as the same variables were inserted later in the code.