Partially fix overlay bug