fixed onComplete called twice