fixes problem "cannot write a non-number as a number" on node v0.8