Library pagination working