fixed an issue with missing nodes and completed matrix