Fixes #1221
Fix for #1218