Some fixes

But why is the screen still flickering?