Fixes for #47