Fix error for undefined nodes