test case for bug #1120