fix functionality glitch