Fix strange warnings with loggig