fixing weird json bugs