Fix behaviour when screen is disabled
Optimizing palette changes mid-frame