Fixing error with footer variable not set