Fixed some crashes with null State (transition to close)