Merge branch 'bug-1177' into bug-893