fixes #507