Changed numPatch to allow zero outputs