Changed to work with overlays