Correcting number of void regions in output function