fix bugs with pagination and types
fix some bugs with pag. and types