Various bugfixes to class entry.