fixed gcc compilation errors