Handle invalid states