Updated the patches script to handle some invalid patches.
Patch modal handles invalid patches.