Fixes #1343
Fixes #1339