Fixed pass by value/reference bug in cleanJson