fixes #1404; fixes #1642