Added handling to make sure all rows have the same length.

looks like a typo here