Final fixes for issue #554