The attached version replaces the rows and cols entries with a list of valid dimensions. Please test and comment.
The attached version replaces the rows and cols entries with a list of valid dimensions.
Please test and comment.