fix for cross-browser compatibility