fixed cross browser compatibility issues