some bugs were corrected