fixes #522