Fix f g h placement in struct node