Fixed on click event to work with all pegs.
Fixed merge conflicts.