fixed some g++ warnings