fixed for node 0.10 and 0.8