fixed some bugs in the zig zag drawing