Fixed gcc errors