Fix bug with redefinition variables