Somehow timer is not working in a new thread.