Better end of border checking