Fixes for issue #554