Fix for 6514

Merging the fix for 6514 from test to production.