Removed bugs in bndCheck