Some bugs were fixed.
Bug fix