handle transaction timeout at 2 places