fixed issue with loading icon logic where it would be displayed and then not go away.