added a test for #517