Fixed conversion to js string