fix #9 (timeout bug)