Issue #380 Fixed bugs