fixed GCC compilation errors