Fixed issue with database escaping not working when using multiple database connections.