Fix js problems (ff obtains response as string, chrome obtains response as object)