Some bugs' fixed.