Fix check for protected squares.