diff --git a/pathauto_entity.module b/pathauto_entity.module
index 3cfd00e..780c069 100644
--- a/pathauto_entity.module
+++ b/pathauto_entity.module
@@ -433,7 +433,7 @@ function pathauto_entity_alias_form($form, $form_state, $form_id, $entity_type)
     $default_uri = entity_uri($entity_type, $form_state[$entity_type]);
     $entity_info = entity_get_info($entity_type);
 
-    if (!empty($form_state[$entity_type]->$entity_info['entity keys']['id'])) {
+    if (!empty($form_state[$entity_type]->{$entity_info['entity keys']['id']})) {
       $conditions = array('source' => $default_uri['path']);
       $langcode = pathauto_entity_language($entity_type, $form_state[$entity_type]);
       if ($langcode != LANGUAGE_NONE) {
@@ -448,7 +448,7 @@ function pathauto_entity_alias_form($form, $form_state, $form_id, $entity_type)
     // Determine if another module already add $form['path']
     $path += array(
       'pid' => NULL,
-      'source' => isset($form_state[$entity_type]->$entity_info['entity keys']['id']) ? $default_uri['path'] : NULL,
+      'source' => isset($form_state[$entity_type]->{$entity_info['entity keys']['id']}) ? $default_uri['path'] : NULL,
       'alias' => '',
       'language' => isset($langcode) ? $langcode : LANGUAGE_NONE,
     );
