Bugfixes

-Bugfixes: After running a query multiple times repeatedly,it threw an
unhandled exception
Cleanup