improved checking of crossings