Fixes for last commit, undefined variable.