allow cross domain execution
Fix a few issues