Fixes for #105.

TBR @devoncarew @ussuri.