Don't call methods on undefined variables...

This has to be a bug. The old code tried to invoke a method on an undefined variable. If I change it to '$csr', as seems to be the intention, the error message disappears and the page loads normally.