Fixed gcc compilation problems