fixes pagination in searches