minor bug fix to use defined timeout