Fix a bug to remove a loading message after a loading failure