max_time=-1 is not good, fixed