Fix for sql syntax error if not using a database prefix.