Cleaner fix for #1626, closes #1626