Fixed globals, fixed crash when indexing stuff with non-existant key