fixes #1734

See https://med.inria.fr/redmine/issues/1734