fix some bugs. Synchronous and Asynchronous(Future) versions are ok.