Fix for coverity 24987