Cross-orgin fix for ff and chrome