Some bugs were fixed