fixes #1328
fixes #1167