Fixed error on closing the qtViewer app