fix patch method