Add node test (and fix to main code)