changed some bugs