Added cross browser compatibility