closes #1165