It works for me. You must be having other problems. But you didn't really provide much information. Providing a few lines of code out of context does not help anyone understand the real issue.
...