Resolve Issue #5822

Please read my comment in Issue #5822