Fixed completed method so it properly uses ajax