Fixed gcc compiler errors