fixed invalid move error when row and col is outside board