this fixes #340