patched sampler AJAX bug