Refine boundary crossings.