Fix to use new variables