Merge pull request #6792 from MrPetovan/bug/warnings