fixed some analyzer warnings