fix rendering glitch