fixed some bugs2