Fixed bug for diagonal check #1