Bugfix: handle with negative values of y