issue #1026 fix + test