fixed security issue on gadget loading
fixed Relative URL problem