Move numRows assignment after bad input test.

Fixes a possible bug computing board sizes with bad configs.