fixed some bugs]