BUG  -- fix bug of paginate