Small bug fixes uncovered by node 0.10.