closes #966