support sync upstream first. fixed #451