fixed bug in passing conditions in pagination function
fixed changes to session and request classes