fixes to njsWaitNode