Fix timeout handling. Previously the default max timeout was 10x to small.