added test for issue #1366