Optimize, g++ compatibility