added fix for refreshing