Fix occurrences of out of range exceptions
Merge pull request #32 from barijaona/checkRowRange

Fix occurrences of out of range exceptions