Fixed Time out bug

When an time out occurred the process crashed, this is now solved