Applied fix suggested by @jasonagnew in #3184