Fix some compilation problems