fix bug in timeouts.c