Fix linux build and warnings