fix state renumbering logic and add bounded quantifiers