Additional fixes for #167