FIX: bug in getting the ID of a node