Added timeout to button click event.