 modules/state_flow_entity/plugins/state_flow_entity.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/state_flow_entity/plugins/state_flow_entity.inc b/modules/state_flow_entity/plugins/state_flow_entity.inc
index de7c655..7e76f6e 100644
--- a/modules/state_flow_entity/plugins/state_flow_entity.inc
+++ b/modules/state_flow_entity/plugins/state_flow_entity.inc
@@ -778,7 +778,7 @@ class StateFlowEntity extends StateMachine {
       $query = db_select($entity_info['revision table'])
         ->fields($entity_info['revision table'], array($revision_key))
         ->condition($id_key, $entity_id)
-        ->orderBy($revision_key, 'DESC')
+        ->orderBy('timestamp', 'DESC')
         ->range(0, 1);
       return $query->execute()->fetchField();
     }
