More bug fixes for #96