fix node detection to be more functional e.g. it works at least a non zero amount