Fix warnings, fix old gcc