Added an activity indicator while updating states