Fix defect detected by static analysis tool