Fixing the zigzag issue using stackoverflow question case:

http://stackoverflow.com/posts/26679161/edit