diff --git a/src/Entity/Flagging.php b/src/Entity/Flagging.php
index 1001b00..9e26d39 100644
--- a/src/Entity/Flagging.php
+++ b/src/Entity/Flagging.php
@@ -86,7 +86,9 @@ class Flagging extends ContentEntityBase implements FlaggingInterface {
    *   The flaggable entity.
    */
   public function getFlaggable() {
-    return $this->entityManager()->getStorage($this->getFlaggableType())->load($this->getFlaggableId());
+    $flaggable_type = $this->getFlaggableType();
+    $flaggable_id = $this->getFlaggableId();
+    return $this->entityManager()->getStorage($flaggable_type)->load($flaggable_id);
   }
 
   /**
