fixes undefined variable