issue 398

Fixes #398