some bugs fixs