Some fixes for #43