fixing some crashes due to malformed policy files