A modified node-to-segment algorithm passing the contact patch test