Fixes for #141