fixes #1341; fixes #1117