Fixed CppCheck issues

Fixed CppCheck issues