sort out g++ error