closes #1138