Fix invalid state: 'normal' error, and make it clearer what state is invalid.