Fix logics for avoidling timeout error