undefined variable glitch fixed