Fixing warning messages