Corrected the position of the call to query_tableNames()
This looks like it got lost when applying a patch