fix sqlfetch issues