added Florent fix from master branch