fix bug with time==0
fix same bug in node