Fixes undefined variable error