Node fixes

fixes to make it work on node