Fixes #1321
Fixes #1327