removed typo and added fix for array of {k, v}