fixed getting codec from classes that have generictypes