Fixes for #278