Fix js parsing problems