Fix cross compilation bug