Fixes for #1075