fixed trailing json issue