diff --git a/Aggregation/GeoHashGridAggregation.php b/Aggregation/GeoHashGridAggregation.php
index f5fb75c0fc88695d402c4b6bd2844c59aaafe4a0..e2642a552a248ce0f40fdfde0cc1f67ee34f41aa 100644
--- a/Aggregation/GeoHashGridAggregation.php
+++ b/Aggregation/GeoHashGridAggregation.php
@@ -96,15 +96,15 @@ class GeoHashGridAggregation extends AbstractAggregation
             throw new \LogicException('Geo bounds aggregation must have a field set.');
         }
 
-        if ($this->precision) {
+        if ($this->getPrecision()) {
             $data['precision'] = $this->getPrecision();
         }
 
-        if ($this->size) {
+        if ($this->getSize()) {
             $data['size'] = $this->getSize();
         }
 
-        if ($this->shardSize) {
+        if ($this->getShardSize()) {
             $data['shard_size'] = $this->getShardSize();
         }