fix sql connection