Fixed loading view code