fix Issue #224 #222 #221