fix errnoneous calculation of x_45 and y_45 coordinates