pagination and upload issue fix