fix the problem: timeout in params doesn't work

old version, time in setTimeout was fixed, so timeout in params does
not work at all.