Clear the prevClassCode to null as well when present