 	Timer.cancel()
 	Db.shared.set 'questiondeck', [0..Black.numcards() - 1]
 	Db.shared.set 'answerdeck', [0..White.numcards() - 1]
-	Db.shared.set 'round', 0
+	Db.shared.set 'lastround', 0
 	Db.shared.set 'score', {}
 	Db.shared.set 'rounds', {}
 	Db.shared.set 'paused', false

	request.respond 200, JSON.stringify db

exports.onUpgrade = !->
	log 'Upgraded the Plugin'
	log 'This plugin"s public URL:', Plugin.inboundUrl()
	log 'Plugin Userids:', Plugin.userIds()

	if not Db.shared.get 'roundlength'
		Db.shared.set 'roundlength', 6


	Timer.cancel()

	round = Db.shared.ref 'rounds', roundId
	if not round
		log 'Invalid round:', roundId
		return

	if round.get('phase') isnt 'draw' then return

