fixed global leak in zeros,zigzag functions