fixed memory leak by releasing the connection back to the pool after query executed