Saving a new writer document as a .doc or .docx always saves as a .txt

I was using 4.4 and lately it started saving documents as a .txt. I can’t open it by just double clicking on it. I recently updated to 5.2, and it still does the same thing. I can modify an existing document and it stays as a doc or docx. I’ve been using Libreoffice for quite a long time. What do I need to do to make it work correctly again??

Go to Tools - Options - Load/Save - General. Make sure that the value for Always save as is set to ODF Text Document instead of Text.