# References duplicate appearing before cover page

I am writing my bachelor thesis on Overleaf and it has a cover page and references at the end. The references appear correctly at the end, but the problem I have is that they are also being generated (duplicated) and appearing at the very top of the pdf file, when I compile.

This duplicate not only is not supposed to be there, but it also has page numbers (that fortunately do not influence the rest of the page numbering from the cover page on).

I have already cleared the cache and nothing changed.

How do can I delete the references at the top and only leave the final, correct one?

Here's my code (I apologize if this isn't a MWE, but I just don't know what could be creating the problem, given this is LaTeX):

\documentclass[12pt]{report}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{booktabs,threeparttable}
\graphicspath{{images/}}
\usepackage[super]{nth}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}
\makenoidxglossaries
\input{glossary}

\usepackage{apacite}
\usepackage[utf8]{inputenc}
\usepackage[a4paper,width=160mm,top=25mm,bottom=25mm]{geometry}
\usepackage[toc,page]{appendix}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[R]{TBATS Models for Predicting Time Series Uber Travel Times Data}
\fancyfoot{}
\fancyfoot[R]{\thepage}
\fancyfoot[L]{\rightmark}
\usepackage{float}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{indentfirst}
\usepackage{colonequals}
\usepackage[font=small, labelfont=bf]{caption}
\captionsetup[table]{skip=10pt}
\bibliographystyle{apacite}
\bibliography{mybib.bib}

\begin{document}

\input{Title Page}

\input{abstract}

\tableofcontents

\printnoidxglossary[type=acronym, nonumberlist]
\printglossary[type=acronym]

\chapter{Introduction}
\input{introduction}

\chapter{Related Literature}
\input{LR}

\chapter{Methodology}
\input{methodology}

\chapter{Findings}
\input{findings}

\chapter{Conclusion}
\input{conclusion}

\bibliographystyle{apacite}
\bibliography{refrences}

\begin{appendices}
\chapter{TBATS Models Parameters}
\input{appendix_params}

\chapter{Plotted Residuals}
\input{appendix_res}


• With BibTeX-based bibliographies (which you are using), the command \bibliography prints the bibliography. So if you have \bibliography{mybib.bib} in the preamble, LaTeX tries to print the bibliography in the preamble, this goes horribly wrong (there should be error messages) and results in the bibliography showing up before your actual document contents. Remove \bibliography{mybib.bib} from the preamble and place it only in your document where you want the bibliography printed. – moewe Jan 4 at 9:22
• Unrelated to this issue, but still an error: You can only have one \bibliographystyle in your document. You have two: One in the preamble and one in the document body. Remove one (it doesn't matter which one, both positions are valid and there are valid arguments for either position). – moewe Jan 4 at 9:24
• No, sorry, not with the code shown so far. Check if there are errors that could explain this. You could try moving \glsaddall to after the title page, but the command should not produce any visible output where it is used, so it should not be an issue here. – moewe Jan 4 at 12:08