regen some patches
submitted and maintained by Jon Trembley <jon@brain-box.net> slightly modified by me