added test for #580