Fixes undefined variable