Fixed bug when call onComplete when executed function returns void