fix right-rail overflow and setting currentPage when docId does not initialize immediately