closes #1167