pulled updates from upstream to support HA