Task #WP-1137: fix $type into $node->type