Added a few things for multiple state support.