Fixed some compilation problems