fix remaining warnings, fix compiling errors when using --release