The judge said there was a serious risk to customer health