fixed a webkit compatibility issue