 app.set 'view engine', 'handlebars'
 # app.enable 'view cache'
 
-packageList = { }
+packageList = null
 updating = no
 updateTimeout = null
 lastUpdate = new Date

							else
								fileCallback err, data
		, (err, data) ->
			if err?
				error "Error reading package list: #{err}"
				callback? false
				return
			
			data = data.filter (item) -> item?
			
			# overwrite packageList once everything succeeded
			packageList = data
			# update scan time and statistics
			lastUpdate = new Date
			updateTime = process.hrtime updateStart
			debug "Finished update"
			
			# and finally call the callback

				res.redirect 301, "#{host}/#{req.query.packageName}/#{req.query.packageVersion.replace /[ ]/g, '_'}"
			else
				res.redirect 301, "#{host}/#{req.query.packageName}"
			return
		
		unless packageList?
			res.sendStatus 503
			return
		
		unless req.accepts 'xml'
