fixed porting issue