remove extraneous comma from JS