another bug fix to #20