fix for cross-browser