list_patches: fix error when patches exist