closes #1139