fix bug reported by Cheney