Commented multiple node detection and added library(Matrix) to avoid error