updated
Fixed some bugs