Fixes issues/8614

See https://github.com/saltstack/salt/issues/8614