fix some register errors