fixed g++ errors/warnings?