Added boundary checking detection thing