fix overlay bug