fix pvs studio warnings