diff --git a/lib/travis/requests/services/receive/push.rb b/lib/travis/requests/services/receive/push.rb
index <HASH>..<HASH> 100644
--- a/lib/travis/requests/services/receive/push.rb
+++ b/lib/travis/requests/services/receive/push.rb
@@ -62,13 +62,17 @@ module Travis
             end
 
             def commit_data
-              last_unskipped_commit(event['commits']) || event['commits'].last || event['head_commit']
+              last_unskipped_commit || commits.last || event['head_commit']
             end
 
-            def last_unskipped_commit(commits)
+            def last_unskipped_commit
               commits.reverse.find { |commit| !skip_commit?(commit) }
             end
 
+            def commits
+              event['commits'] || []
+            end
+
             def skip_commit?(commit)
               Travis::CommitCommand.new(commit['message']).skip?
             end
diff --git a/lib/travis/travis_yml_stats.rb b/lib/travis/travis_yml_stats.rb
index <HASH>..<HASH> 100644
--- a/lib/travis/travis_yml_stats.rb
+++ b/lib/travis/travis_yml_stats.rb
@@ -109,7 +109,7 @@ module Travis
     end
 
     def payload
-      request.payload
+      request.payload.is_a?(String) ? MultiJson.decode(request.payload) : request.payload
     end
 
     def commands
request receive: add some extra safe guards