Further fixes for issue #16.