fixes #660