Fixes #1091; Fixes #1090