Fix the background window bug