fixes #966