Fix some more inconsistencies in json manipulation