Shouldn't this also be in the if IsClass block?