Final fix for issue #1067