Fix missing variable bug caused by refactoring or merge.
Merge branch 'math-fixes-20130812' into testing