added fixes for states returned as strings