Fix #185: when y value is null, convert it to 0.