Fixes #1327
Fixes #1321