Fixing issue #311.