dirty hack with timeout