fixes overlay bug