fixed some compilation problems