fix non-jquery ajax call