fixed a bug with overlays counter