tested with yaoxin, fixed some bugs.....