bugfix to diagonals