Fixed problem with equal y values.

Fixed issue #1