Correct cols and rows to remove horizontal oveflow