Modifications for use in libdecode