Some code fixes around browser compatibilities.