Update from #216 by @Gregoire-M