Possibly fixed porting issues