Clear loader if we exit the current view otherwise the resources may be loaded on the new view