Bugfixing

Did some bugfixing, just realised that table names can't be passed as parameters,
pretty obvious..