Fixed more counting issues