Bug fixes #1081381, #1073342, #1008654

[merge]