sometimes activities do not get loaded on time so also added refresh button and fixed other stuff