Bux fix,add new API and optimizing.