Fix for undefined variable error.