Fix for the hang after close caused by my previews perf queries commit. Sorry for that. fix issue 6205