diff --git a/posting/list.go b/posting/list.go
index e858cf676d64b99a6ed15c1fc496f31130b427f3..92a56e2ec1850ae92f8fd7e926d09f5e742dfec3 100644
--- a/posting/list.go
+++ b/posting/list.go
@@ -734,6 +734,9 @@ func (l *List) GetUids(offset, count int) []uint64 {
 		count = 0 - count
 		offset = l.length() - count
 	}
+	if offset < 0 {
+		offset = 0
+	}
 
 	if count == 0 {
 		count = l.length() - offset