fixes #1588
fixes #1586