fixed bug reported by Leonard Siebeneicher.