fix for bad json splicing