 				Dom.text Db.shared.get( 'game', 'teams', teamId, 'teamScore') + " points"
 			Dom.cls 'bar-button'
 			Dom.style ->
-				backgroundColor: Db.shared.get('colors', teamId, 'hex')
+				backgroundColor: Db.shared.peek('colors', teamId, 'hex')
 
 addProgressBar = ->
+	log 'Render progress bar outer'
 	Db.shared.observeEach 'game', 'beacons', (beacon) !->
+		log 'Render progress bar 1 beacon'
 		if beacon.get('inRange', Plugin.userId())?	
 			dbPercentage = beacon.get("percentage")
 			nextPercentage = -1
 			nextColor = ""
-			action = beacon.get('action')	
+			actionStarted = beacon.get("actionStarted")
+			log 'Action started ', new Date()/1000-actionStarted, ' seconds ago'
+			action = beacon.get('action')
+			barText = ""
 			if action == "capture"
 				nextPercentage=100
-				dbPercentage += (new Date() /1000 -beacon.get("actionStarted"))/30 * 100
-				dbPercentage -= 9.8
-				log "actionStarted = " + beacon.get("actionStarted")
+				dbPercentage += (new Date() /1000 -actionStarted)/30 * 100
+				#dbPercentage -= 9.8
+				log "actionStarted = " + actionStarted
 				if dbPercentage > 100
 					dbPercentage = 100
-				nextColor = Db.shared.get('colors', Db.shared.get('game', 'beacons', beacon.n, 'nextOwner'), 'hex')
+				if dbPercentage < 0
+					dbPercentage = 0
+				nextColor = Db.shared.peek('colors', Db.shared.get('game', 'beacons', beacon.n, 'nextOwner'), 'hex')
+				barText = "Capturing..."
 			else if action == "neutralize"
 				nextPercentage=0
-				dbPercentage -= (new Date() /1000 -beacon.get("actionStarted"))/30 * 100
+				dbPercentage -= (new Date() /1000 -actionStarted)/30 * 100
 				if dbPercentage < 0
 					dbPercentage = 0
-				nextColor = Db.shared.get('colors', Db.shared.get('game', 'beacons', beacon.n, 'owner'), 'hex')
+				if dbPercentage > 100
+					dbPercentage = 100
+				nextColor = Db.shared.peek('colors', Db.shared.get('game', 'beacons', beacon.n, 'owner'), 'hex')
+				barText = "Neutralizing..."
 			else
 				nextPercentage = dbPercentage
 				if beacon.get("owner")==-1
-					nextColor = Db.shared.get('colors', Db.shared.get('game', 'beacons', beacon.n, 'nextOwner'), 'hex')
+					nextColor = Db.shared.peek('colors', Db.shared.get('game', 'beacons', beacon.n, 'nextOwner'), 'hex')
 				else
-					nextColor = Db.shared.get('colors', Db.shared.get('game', 'beacons', beacon.n, 'owner'), 'hex')
+					nextColor = Db.shared.peek('colors', Db.shared.get('game', 'beacons', beacon.n, 'owner'), 'hex')
+				barText = "Competing with others..."
+			if dbPercentage == 100
+				barText = "Captured"
 			time = 0
 
 			if nextPercentage != dbPercentage

								beaconCircles.splice(beaconCircles.indexOf(beaconCircles[i]), 1)
							i++
						map.removeLayer marker
						Server.send 'deleteMarker', marker.getLatLng()
					marker.on('dblclick', markerDelClick)	
				else
					popup = L.popup()

								Time.deltaText capture.get('timestamp')
					else if capture.get('type') is "score"
						teamId = capture.get('leading')
						teamColor = Db.shared.peek('colors', teamId, 'hex')
						teamName = Db.shared.peek('colors', teamId, 'name')
						log "print score: teamId; " + teamId
						Dom.onTap !->
							page.nav 'scores'							
