Fix timeout bug