javascript example fix