NginX directive not working for rtmp application

I have downloaded nginx and the rtmp module. I got everything working but fiddle around using config directives.

rtmp {
    server {
        listen 1935; 
        application live {
            live on;
            record off;
            push rtmp://127.0.0.1:1935/source/$name;
        }  
        application source {
            live on;
            record off;
            meta copy;        
            push rtmp://live.twitch.tv/app/$name;
        }      
    }
}

My problem is that in the application > source block the directive $name seems not to be recognized while it works in appication > live. Am i using it wrong?

Thanks in advance