Fix getDepthREST on node.js