Fixes for #31.