Fixed issue with using old variable name