use the correct method for hiding and displaying loading-indicator