Fixes for #49