Fixed timeout bug