fixes loader animation scope in AJAX