Fix for issue 5513

PR for issue #5513