fix some registerize porting bugs