Fix bug reported by Nabil