Removed unnecessary if statement in stopLoading