Fixing barycentric-cartesian conversion