Fixing the db connection escaping