Fix some more bugs with ManageStates.js