Fix g++ issues