browser dependent js fixes