fix some compilation problems