fix bugs with nodejs 0.10