Adding zero handling to perforate.