try to fix bug when refreshing page