Fix future bug when onSuccess is called after the excution is completed