Revert "Revert "修改了一些bug""

This reverts commit 8bfa9c5633e070c5a691e4a2cd0a0813bc8bde3d.