Fixes for #1202