Fixed boundaries check with planes and squares