correct scan-build identified issues