Fixed some complaints of PVS Studio