         else
           $scope.title = "#{data.results[0].bill_type.toUpperCase()} #{data.results[0].number}"
       ).error (data, status) ->
-        console.log "Error #{status}: #{data} (thrown by getBillTitleOnLoad)"
+        console.log "Error #{status}: #{data} (thrown by getBillTitle)"
 
     getQueryListOfBills = ->
       query = $scope.bill_query.replace(/\s/g, '%20')



    getBillList()
    getBillTitleOnLoad()
    getBillTextOnLoad()

  ])

        method: "GET"
        url: "http://congress.api.sunlightfoundation.com/bills/search?query=%22#{query}%22&apikey=3cdfa27b289e4d4090fd1b176c45e6cf"
      ).success((data, status) ->
        $scope.bills = data.results
      ).error (data, status) ->
        console.log "Error #{status}: #{data}"
