Hiding the loading indicator when it is not used. Based on a patch from