fixed halfspace bug with epsilon