fixing bug in issue19