Added a fix to ensure backgrounds are cleared appropriately