Backporting 1.0.8 into master