clear timeout when template is destroyed