Fixed progress dialog not disappearing if sorting failed.