added NODE_DEBUG support. fixed bug in decoder.