fixed several warnings, most of them are "Wreorder"