Small bug with json parsing