Minor fixes
Don't leak the results of open_querys