fix bugs with overlays