Fix callback hang in node.js 0.8 on errors