fixed resync still need to deal with edge case where user closes before sync is complete