add swipe to refresh, fix some sync bugs