Merge pull request #1118 from jlewallen/develop

When there's a prefix, table name escaping creates SQL error.
Making some queries table prefix friendly.