Fixes #184 (but further refinement is likely)