I had this problem while trying to mix figures and text. What worked for me was the 'H' option without the '!' option.
\begin{figure}[H]
'H' tries to forces the figure to be exactly where you put it in the code.
This requires you include
\usepackage{float}
The options are explained here