FIX: wrapped something in $.when()