Remove unused include
Fix off-by-one crash on selection at max{x,y,z}