fixes #976