Fix __set_state to perform properly