added a couple of improvements for node 0.6