fixed g++ compiling