fixed the porting issue finally