Fixes for issue#16