Fixes for issue #924