Fixed loadingtrail sticking around when done

Fixed loadingtrail sticking around if there was an error.