fixes static analyzer issues