test for issue 542 and 591