Fixes for #1372