Made the overlay opacity transition more smoothly