porting test/fixing issues