Fix: correct a stupid mistake of writing the classmap inside a loop