Javascript bug fixes.