Fixed use of equals (closes #2109)