fixes mainly in get_jstate_subset()