_timeoutfgets fix