Merge branch 'bug-1054' into bug-1042