Fixed some bugs (2)