Fixed Variable Scopes in Tables Controller.