Add some caching to fix piece flicker