Further fix to 25aaff9

Accidentally introduced a different bug - this commit resolves it.
This closes #412