Merged changes from Jean-Philippe