add table prefix to places missing in the query

Fixes issue #14