Fix parsing of repeat count and padding.