fixed the type of the visited counter