pagination + bugfixing