fix minor bugs with refreshing