Globals are a bug. This commit should go straight into dev IMO.