fix bug on new nodejs (at least on 0.10.12)