Fixed insert error based on facilityId.