FIXED: correct range maximum used for setting x-values