Fix setting of last node and use random() instead of % in fixlight