updated loading indicator handling