fixd some bugs