fixed pagination on first page and other stuff