Fixing some numerical stability issue in mitter join