diff --git a/src/in/srain/cube/views/GridViewWithHeaderAndFooter.java b/src/in/srain/cube/views/GridViewWithHeaderAndFooter.java
index <HASH>..<HASH> 100644
--- a/src/in/srain/cube/views/GridViewWithHeaderAndFooter.java
+++ b/src/in/srain/cube/views/GridViewWithHeaderAndFooter.java
@@ -261,7 +261,7 @@ public class GridViewWithHeaderAndFooter extends GridView {
             return super.getNumColumns();
         } else {
             try {
-                Field numColumns = getClass().getSuperclass().getDeclaredField("mNumColumns");
+                Field numColumns = GridView.class.getDeclaredField("mNumColumns");
                 numColumns.setAccessible(true);
                 return numColumns.getInt(this);
             } catch (Exception e) {
issue #<I>: fetch the proper class