Pacth rebuild method