Fixes for #36.