Fix alphabetical order sorting bug in classes rendering