fixed counting unreachable nodes
repainting map after resize