fix for recent sql errors around connection object