Fix to use always the first param as timeout if only that one was provided while keeping backwards compatability with 2 params.