Fix bug reported by Bo.