Fixes for #31