 		else 
 			log "map not ready yet"
 		Obs.onClean ->
-			if beaconMarkers? and map?
+			if beaconMarkers? and map? and beaconCircles?
 				if markerDelClick?
 					marker.off('dblclick', markerDelClick)
 					marker.off('contextmenu', markerDelClick)

					Dom.style
						_flexGrow: '1'
						_flexShrink: '1'
					if Plugin.agent().android? or Plugin.agent().ios?
						Dom.text "Tap-and-hold"
					else
						Dom.text "Right-click"
					Dom.text " to place beacon on the map. The circle indicates the capture area for this beacon. "
					if Plugin.agent().android? or Plugin.agent().ios?
						Dom.text "Tap-and-hold"
					else
						Dom.text "Right-click"
					Dom.text " a beacon to delete it. Be sure to place beacons in places you and other happening members visit often."
	else
		renderMap()
		renderBeacons()
		Modal.show("Admin/plugin owner is setting up a new game.")

# Home page with map
mainContent = ->

					Dom.style
						_flexGrow: '1'
						_flexShrink: '1'
					Dom.text "Click here for more information."
				Dom.onTap !->
					Modal.show tr("Gamearea setup information"), !->
						Dom.div !->
							Dom.text "Drag the corners of the orange rectangle to define the gamearea. Choose this area wisely, this is where the map will be limited to during the game."
							Dom.br()
							Dom.br()
							Dom.text "Your own location is drawn on the map as a pushpin."
							Dom.style maxWidth: '300px', textAlign: 'left'
					, (ok)->
						ok= undefined;
					,['ok', tr("Ok")]

		else if currentPage is 'setup2' # Setup beacons
			# Bar to indicate the setup progress
