some bugs were fixed.