Bugfixes and node 0.11 compatibility.