local-ize a couple more variables
fix a missed function name (due to being renamed)