Fix a bug I introduced

Closes #382.

@nomis52, do you want to check this retrospectively please.