Static analysis fixes

Fixed issue found in static analysis.