Fix error in code. closes #2689