fixed cross browser compatibility