static analyzer bug fixes