Fixes unselectable fifth row. Fix #431.

Error was caused by checking for the wrong maximum value. There can only be 5 columns not 5 rows.