empty corner case in boundary detection