Fix defect detected by static anlaysis tool