Bug 857427 - Fix more problems spotted by ttaubert