fixed porting bug in compute