bug fixes, pagination support