fix diagonal checking

last commit didn't have a completed diagonal checking