fixes #1373

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #1373
| Refs tickets  | -
| License       | MIT
| Doc PR        | -

fix actually authored by @drak

I left the old code in for future reference - you said you wanted to take a "deeper look later."