Fixed #385
Fixed #380