added testcoverage for #1062.