fix for bug#1, reported by (and fixedi by!) jmg19