Fix bug reported by Sebastian G. Botasi