Thanks. I updated the code. Works fine now.