change timeout to upper bound to avoid possible race condition