minor fixes to reduce warnings in mingw