Fixed set_timeout bug