Fixed some position computations.