Bug in json item for loop