fixed issue where a reference to a table name didn't exist