Added cross domain support
Fixes for firefox