added test for issue #539 fix