improved handling of diagonal crossings