add connection release to processQuery