Fix sql error for some equipment.