Thanks everyone. This post helped me in hunting down the issue