Updated to patch in proper order and exit with correct status