fix browser compatibility issues