Fixed tests

I don't know what the 'quardAjax' method does, but it was breaking the tests.

It's too late to investigate now, but we should understand why this fix works before merging.