add: fixed some bugs