Fixes for #413