Dealed with some compilation errors with gcc