Fix for Coverity warnings (M. Sitta)