Fix non-existent state name bug