javascript parse fix