improved node state management