Fixed Crash if no state is set