cls: compile fix for newest texlive
alg: some fixes