fix compabilitiy issue for old browser