PagedTable just show first and last page

hi …
i,m using pagedTable add on , the problem is the paged table just show the first and the last page of records, for example if i have 30 records and have table.setPageLength(25); when i choose 5 items per page just show 5 records in first page and when go to the second page just show records of 24 to 28 , but when i choose the 25 items per page or grater it works fine …

here is my code , i hope someone can help me …
thanx



public abstract class BasicFormPage<E> extends CustomComponent  {


	 protected final PagedTable table;

	/** Compose the demo. */
	public BasicFormPage() {

		// Layout the example 
		VerticalLayout root = new VerticalLayout();
		root.setMargin(true);
		root.setSpacing(true);
///.....


here is some code 

.....///

table = createTable();
		table.setWidth("100%");
		table.setColumnReorderingAllowed(false);
		table.setColumnCollapsingAllowed(false);
		 table.setPageLength(25);
		 table.setImmediate(true);
		 
///.....


here is some code 

.....///
		 
		 VerticalLayout buttonBar = new VerticalLayout();
		buttonBar.setSpacing(true);
		buttonBar.addComponent(table);
		buttonBar.addComponent(table.createControls());
		
		
		///.....


here is some code 

.....///
			protected abstract PagedTable createTable();
		protected abstract Object[] getFormItemArray(E insurance);
		
		}
		}

and the extended class is :





public class DefineClaimFormPage  extends BasicFormPage<ClaimDefineEntity>{

private PagedTable table;

///.....


here is some code 

.....///

		@Override
	protected PagedTable createTable() {
		 table = new PagedTable();


		table.addStyleName("components-inside");
		/* Define the names and data types of columns.
		* The "default value" parameter is meaningless here. */
	

		
		table.addContainerProperty("claimTopic", String.class, null);
		table.setColumnHeader("claimTopic", "claimTopic");
		table.setColumnWidth("claimTopic",170);
		
		
		table.addContainerProperty("claimComment", String.class, null);
		table.setColumnHeader("claimComment", "claimComment");
		table.setColumnWidth("claimComment", 400);
		
		table.addContainerProperty("isActive", String.class, null);
		table.setColumnHeader("isActive", "isActive");
		table.setColumnWidth("isActive", 60);
		
		
		
		
		table.addContainerProperty("update", Button.class, null);
		table.setColumnHeader("update", "update");
		table.setColumnWidth("update", 50);
		
		table.addContainerProperty("remove", Button.class, null);
		table.setColumnHeader("remove", "remove");
		table.setColumnWidth("remove", 50);
		


		table.setStyleName("wordwrap-table");
		
		table.setHeight("600px");
		table.setWidth("700px");

		table.setColumnCollapsingAllowed(true);
		table.setColumnReorderingAllowed(false);


		return table;	
		}

	@Override
	protected Object[] getFormItemArray(ClaimDefineEntity insurance) {
		
		
		String isActive; 
		if (insurance.getIsActive()){
			isActive = "active";
		}
		else {
			isActive = "not active";
		}
		
		return new Object[]{insurance.getClaimTopic(), insurance.getClaimComment(),isActive};

	}
	}