Fix bug reported by esneider