Error and waitbar cancelling