closes #1161