Fix for issue #5036