Set timeout correctly