Fixed an issue when errors eccoured

-Fixed an issue that would cause the loadingtrail to stick around and
not trigger the done function when an error occured.