fixed the bug reported by Don