fix oqscript to get an opened connection