Fixed m2m and paginator bugs