Fixing issue #682