fixed bug proposed by Issue #224