Fix problem with key-value-pair parsing