Fixes for #1770