It finally works correctly! node.js is pretty cool...