Add inheritance nastiness to make dynamic classes work