fixes #581