fix invalid js in response