Implemented re-patch checking, re-patch on wakeup