fixed seg fault from timeout