Bug fix in the nodejs javascript