Fixes for #1818