Several bugs were fixed.