fixed some mispellings in some code that would create incorrect results.