Fix overlay display condition