fix for undefined variable error (again)