Fixed bug that would cause a crash if the xValue was 0