Fixed: fix some bugs.