fix problem with x-axis origin computation moving the origin at the wrong time