fix some register set bugs