fixes #662