Fix coordinate computation when x or y is 0 in non standard way