WIP on fixing flickering bugs