Modified to work with supertags.