Readded the overlay hiding code