Include cleveref package as late as possible
From the official package documentation:
13 Interaction with Other Packages
The
cleveref
package must be loaded after all other packages that don’t specifically support it, i.e. the\usepackage{cleveref}
line should usually be the last\usepackage
command in your document’s preamble.[…]
cleveref
includes specific support for a number other packages, allowing it to integrate its clever cross-referencing features with the features provided by these packages:babel
,polyglossia
,hyperref
,varioref
,ntheorem
,amsthm
,aliascnt
,subfig
,algorithmicx
,algorithm2e
,listings
.