Fixed bug in inBoundary routine (again)