fix two implicit errors: 1) initialization of current_state and 2) add default case to switch statement