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

yes it does, sorry i hadn't looked close enough at what this was doing.