fixes #1059
fixes #1871